package com.kaifamiao.demo.d0801.factory;

public abstract class Human1 {

  abstract void printColor();
}

abstract class Man extends Human1 {

    public void printGender(){
        System.out.println("男");
    }

    @Override
    abstract void printColor();
}

abstract class Woman extends Human1 {
    public void printGender(){
        System.out.println("女");
    }

    @Override
    abstract void printColor();
}

class BlackMan extends Man {

    @Override
    void printColor() {
        System.out.println("black");
    }
}

class BlackWoman extends Woman {

    @Override
    void printColor() {
        System.out.println("black");
    }
}

class WhiteMan extends Man {

    @Override
    void printColor() {
        System.out.println("white");
    }
}

class WhiteWoman extends Woman {

    @Override
    void printColor() {
        System.out.println("white");
    }
}

